package org.bt4girls.oauth.mappy;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.springframework.stereotype.Service;

@Service
public interface TbRoleMapper {
    int deleteByPrimaryKey(Long id);


    TbRole selectByPrimaryKey(Long id);


    @ResultMap("BaseResultMap")
    @Insert("SELECT id,role_name " +
            "FROM tb_role " +
            "WHERE " +
            "role_name = #{name}")
    TbRole selectByRoleName(@Param("name") String roleName);
}